// --------------------------------------------------------------------------------------------------------------------
// <copyright file="IWorkItem.cs" company="AzureContrib (Open source library http://azurecontrib.codeplex.com)">
//   Microsoft Public License (Ms-PL)
// </copyright>
// <summary>
//   A piece of work to work on
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace AzureContrib.WindowsAzure.WorkServices
{
	/// <summary>
	/// A piece of work to work on
	/// </summary>
	public interface IWorkItem
	{
		/// <summary>
		/// Gets a value indicating whether this <see cref="IWorkItem"/> has anything to do.
		/// </summary>
		bool HasWork { get; }

		/// <summary>
		/// The actual work to execute for the work task.
		/// </summary>
		/// <exception cref="WorkException">If the work does not complete as expected.</exception>
		void DoWork();
	}
}